/*
*
==============================================================================
*  Name        : 
*  Part of     : Omen Game Engine
*  Description : 
*  Version     : 1.0
*
*  Copyright (c) 2013 Lauri Kortevaara.
* 
==============================================================================
*/

#ifndef Omen_GRAPHICSSERVER_H
#define Omen_GRAPHICSSERVER_H

#include "OmenConfig.h"
#include "OmenRenderer.h"
#include "IOmenGraphicsServer.h"
#include "IOmenGraphicsDriver.h"

#include <vector>
#include <string>

namespace Omen {

  /// <summary>Manages graphics related stuff for the engine</summary>
  class GraphicsServer : public IGraphicsServer {

    private: 
        typedef std::vector<IGraphicsDriver *> GraphicsDriverVector;                            /// <summary>A vector of graphics drivers</summary>
    
    public: 
        OMEN_API virtual ~GraphicsServer();                                                                /// <summary>Releases the resources of the graphics server</summary>
        
        OMEN_API virtual void addGraphicsDriver( Omen::IGraphicsDriver* pGraphicsDriver);                        /// <summary>Allows plugins to add new graphics drivers</summary>
        OMEN_API virtual size_t getDriverCount() const;                                                    /// <summary>Gets the total number of registered graphics drivers</summary>
        OMEN_API virtual IGraphicsDriver &getDriver(size_t Index);                                        /// <summary>Accesses a driver by its index</summary>

    private: 
        GraphicsDriverVector graphicsDrivers; /// <summary>All available graphics drivers</summary>
  };

  // ----------------------------------------------------------------------- //

} // namespace Omen

#endif // Omen_GRAPHICSSERVER_H
